<?php
/**
 * Created by 1971599474@qq.com
 * User: zhixuan
 * Date: 2020/1/29
 * Time: 16:41
 */

namespace app\common\utils;


use app\common\utils\phpqrcode\QRcode;

class Utils
{
    //生成二维码
    public static function getQRCode($url, $path, $qrcode_name){
        if(!is_dir($path)){
            mkdir($path,'0777',true);
        }
        $path = $path.'/'.$qrcode_name.'.png';
        QRcode::png($url,$path,'',4,1);
        return $path;
    }
}